
import "./index.scss";
import { View } from "@tarojs/components";
import { observer } from "mobx-react";
import {useContext, useEffect } from "react";
import Taro, { useDidHide, useDidShow,useRouter } from "@tarojs/taro";
import {testStore} from './model'

const  Test = () => {
  let router = useRouter()
  const { updatePageQuery} =useContext(testStore)

  // 可以使用所有的 React Hooks
  useEffect(() => {
    console.log("Test useEffect");
  });
  // 对应 onShow
  useDidShow(() => {
    console.log("Test useDidShow");
    updatePageQuery(router.params)
  });
  // 对应 onHide
  useDidHide(() => {
    console.log("Test useDidHide");
  });
  return <View></View>;
}
export default observer(Test);

